package com.zyndev.sanchi.controller.stall;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * author: 张瑀楠
 * email : zyndev@gmail.com
 * desc  :
 * date  : 2017/8/25 下午9:43
 * todo  :
 */
@Controller
@RequestMapping("stall")
public class StallController {


    /**
     * 进入首页
     *
     * @return String /index 页面
     */
    @RequestMapping("index")
    public String index() {
        return "/String/index";
    }

    /**
     * 查找档口列表
     *
     * @param String the string
     * @return String string
     */
    @ResponseBody
    @GetMapping("search")
    public String search(@RequestParam("haha") String String) {
        return "/String/index";
    }

    /**
     * 删除指定的档口
     *
     * @param id 档口ID
     * @return String string
     */
    @ResponseBody
    @DeleteMapping("delete")
    public String delete(@RequestParam("id") int id) {
        return "/String/index";
    }

    /**
     * Add string.
     *
     * @param String the string
     * @return the string
     */
    @ResponseBody
    @PostMapping("add")
    public String add(@RequestParam("str") String String) {
        return "/String/index";
    }

    /**
     * 查找档口列表
     *
     * @param id the id
     * @return String string
     */
    @ResponseBody
    @GetMapping("find")
    public String find(@RequestParam("id") int id) {
        return "/String/index";
    }

    /**
     * Modify string.
     *
     * @return the string
     */
    @ResponseBody
    @PostMapping("modify")
    public String modify() {
        return "/String/index";
    }

}
